
if exists(select name from sysobjects where name = 'sp_TKBGetByTuan')
	drop proc sp_TKBGetByTuan
go
/*
	Created by: Phuoc NH
	Created on: 13/05/2013 (dd/mm/yyyy)
	Description: 
	--

	File:$sql-scripts/Proc.sp_TKBGetByTuan.sql
*/

create proc sp_TKBGetByTuan
@MaLop Nvarchar(50),
@Tuan int
as
begin
select distinct  a.* from TKB_TK1 a inner join NhipHoc b on b.Tuan=b.Tuan and a.Lop=b.Lop and a.Lop=@malop inner join LopMon d on a.Mon=d.MonHoc where a.Tuan=@Tuan and a.GD not like 'pm%'


end


